<template>
    <tabs-page ref="tabsPage" :list="list" />
</template>

<script>
import Unit from "./unit.vue";
import Convertor from "./convertor.vue";

export default {
    name: "BaseUnit",
    components: {
        TabsPage: () => import("@common/views/common/TabsPage.vue"),
    },
    data() {
        const _this = this;
        return {
            list: [
                {
                    title: '计量单位',
                    value: 'unit',
                    component: Unit,
                },
                {
                    title: '计量单位转换',
                    value: 'convertor',
                    component: Convertor,
                    props: {
                        toUnit() {
                            _this.$refs.tabsPage && _this.$refs.tabsPage.setActive('unit');
                        },
                    },
                },
            ],
        };
    },
};
</script>

<style lang="less" rel="stylesheet/less" scoped>
</style>
